home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / CAD / LISP04.ARJ / END.LSP < prev    next >
Lisp/Scheme  |  1990-07-30  |  1KB  |  37 lines

  1. ;;;   END.lsp
  2. ;;;   Copyright (C) 1990 by Autodesk, Inc.
  3. ;;;  
  4. ;;;   Permission to use, copy, modify, and distribute this software and its
  5. ;;;   documentation for any purpose and without fee is hereby granted.  
  6. ;;;
  7. ;;;   THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. 
  8. ;;;   ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF 
  9. ;;;   MERCHANTABILITY ARE HEREBY DISCLAIMED.
  10. ;;; 
  11. ;;;   by Amy Berger
  12. ;;;
  13. ;;;----------------------------------------------------------------------------
  14. ;;;
  15. ;;; DESCRIPTION
  16. ;;;
  17. ;;;   This is a redefintion of the AutoCAD end command.  You may want to add
  18. ;;;   this command to your acad.lsp file if you have one.
  19. ;;;
  20. ;;;   The end command should be undefined before using this
  21. ;;;   lisp routine:
  22. ;;;
  23. ;;;         (command "undefine" "end")
  24. ;;;   
  25. ;;;   
  26. (defun c:end (/ a)
  27.   (setq a (getvar "cmdecho"))
  28.   (setvar "cmdecho" 0)
  29.   (initget "Yes No")
  30.   (if (= (getkword "\nEND the drawing session?  Yes/<No>: ") "Yes")
  31.     (command "save" "" "quit" "y")
  32.     (princ "\nYou must enter Yes to END a drawing session.")
  33.   )
  34.   (if a (setvar "cmdecho" a))
  35.   (princ)
  36. )
  37.